﻿using Microsoft.Extensions.DependencyInjection;
using System;
using TianShu.AutoMapper;
using TianShu.Modularity;
using TianShu.Service;
using TianShu.TenantManagement.Dal;
using TianShu.TenantManagement.Service.Abstracts;

namespace TianShu.TenantManagement.Service
{
    [DependsOn(
        typeof(TianShuServiceModule),
        typeof(TianShuTenantManagementDalModule),
        typeof(AbpAutoMapperModule),
        typeof(TianShuTenantManagementServiceAbstractsModule)
        )]
    public class TianShuTenantManagementServiceModule:AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            context.Services.AddAutoMapperObjectMapper<TianShuTenantManagementServiceModule>();
            Configure<AbpAutoMapperOptions>(options =>
            {
                options.AddMaps<TianShuTenantManagementServiceModule>(validate: true);
            });
            context.Services.RegisterTransient<IService>(this.GetType().Assembly);
        }
    }
}
